<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="UTF-8">
  <title>JavaScript 数据类型</title>
</head>
<body>
<h2>JavaScript 数值</h2>
<p>写数值时用不用小数点均可,超大或超小的数值可以用科学计数法来写：</p>

<p id="demo"></p>

<script>
  var x1 = 34.00;
  var x2 = 34;
  var x3 = 3.14;
  var y = 123e5;      // 12300000
  var z = 123e-5;     // 0.00123

  document.getElementById("demo").innerHTML =
          x1 + "<br>" + x2 + "<br>" + x3 + "<br>" +y + "<br>" + z;
</script>

</body>
</html>